package br.com.daniele.bean;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("transp")
@Entity
public class Transp {

	private long id;
	private String modFrete;
	private Transporta transporta;
	private VeiculoTransp veicTransp;
	private Volume vol;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getModFrete() {
		return modFrete;
	}

	@OneToOne(fetch = FetchType.EAGER)
	public Transporta getTransporta() {
		return transporta;
	}

	@OneToOne(fetch = FetchType.EAGER)
	public VeiculoTransp getVeicTransp() {
		return veicTransp;
	}

	@OneToOne(fetch = FetchType.EAGER)
	public Volume getVol() {
		return vol;
	}

	public void setModFrete(String modFrete) {
		this.modFrete = modFrete;
	}

	public void setTransporta(Transporta transporta) {
		this.transporta = transporta;
	}

	public void setVeicTransp(VeiculoTransp veicTransp) {
		this.veicTransp = veicTransp;
	}

	public void setVol(Volume vol) {
		this.vol = vol;
	}

}
